//
//  GoodsDetailGoodsInfoCell.m
//  YunGou
//
//  Created by macbook on 16/6/16.
//  Copyright © 2016年 macbook. All rights reserved.
//

#import "GoodsDetailGoodsInfoCell.h"
#import "NSString+Frame.h"
@interface GoodsDetailGoodsInfoCell ()
@property (weak, nonatomic) IBOutlet UILabel *goodsNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *heightConstraint;

@end

@implementation GoodsDetailGoodsInfoCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setModel:(ProductModel *)model{
    _goodsNameLabel.text = model.title;
    _priceLabel.text = [NSString stringWithFormat:@"价值：￥%@",model.money];
    _heightConstraint.constant = [model.title heightWithFont:[UIFont systemFontOfSize:17] withinWidth:ScreenWidth -  32];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
